#include "..\System.h"

///<summary>
/// ToString
///</summary>
private_ bool Equals(System_Object *t, System_Object *obj)
{
	printf("System_Object::Equals(obj)\n");
	return false;
}

///<summary>
/// GetHashCode
///</summary>
private_ int_ GetHashCode(System_Object *t)
{
	printf("System_Object::HashCode()\n");
	return 0;
}

///<summary>
/// ToString
///</summary>
private_ string ToString(System_Object *t)
{
	printf("System_Object::ToString()\n");
	return t->__type->Name;
}

///<summary>
/// System_Object
///</summary>
private_ void *_System_ObjectTypeCtor(System_Object *p, System_Object *t)
{
	System_ObjectVector *vtable = t->__vtable;
	//printf(" __ctor(0x%08x, 0x%08x)\n", p, t);
	t->__parent = p;
	if (p != null) p->__next = t;
	t->__next = nullT(System_Object *);
	t->__interfaces = null;
	vtable[_System_ObjectVIndex_Equals] = (System_ObjectVector)&Equals;
	vtable[_System_ObjectVIndex_ToString] = (System_ObjectVector)&ToString;
	vtable[_System_ObjectVIndex_GetHashCode] = (System_ObjectVector)&GetHashCode;
	return t;
}
System_Type _System_ObjectType = { (__typeCtor)&_System_ObjectTypeCtor, L"Object", (__typeBoxer)&___boxobject, (__typeUnboxer)&___unboxobject, (char*)default(object), _TypeFlags_None };
public System_Object *space(System_Object,ctor)(System_Object *t)
{
	return t;
}

///<summary>
/// Equals
///</summary>
public static_ bool space(System_Object,Equals2)(System_Object *objA, System_Object *objB)
{
	/*TODO*/
	throw(NotImplemented, L"System_Object:Equals2");
    return false; //((objA == objB) || (((objA != null) && (objB != null)) && vcall(System_Object,objA,Equals, objB)));
}

///<summary>
/// GetType
///</summary>
public System_Type *space(System_Object,GetType)(object t)
{
	/*TODO*/
	throw(NotImplemented, L"System_Object:GetType");
    return nullT(System_Type*);
}

//+ type
System_Type _objectType = { (__typeCtor)null, L"object", (__typeBoxer)&___boxobject, (__typeUnboxer)&___unboxobject, (char*)null, _TypeFlags_None };
Implement_System(System_Object, object)